/**
 *  Copyright 2011 Marco Berri - marcoberri@gmail.com
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and limitations under the License.
 **/
package com.conf;

import java.util.ArrayList;

/**
 *
 * @author marco
 */
public class Db {

    private String clazz;
    private String conn;
    private String key = "13051978";
    private ArrayList<String> create;
    /**
     * ramificazione del db
     */
    public static final String TAG_XML_DB = "db";
    /**
     * ramificazione del db statistiche
     */
    public static final String TAG_XML_STATS = "stats";
    /**
     * classe jdbc del db
     */
    public static final String TAG_XML_CLAZZ = "clazz";
    /**
     * connection stirng
     */
    public static final String TAG_XML_CONN = "conn";
    /**
     * ramo di query
     */
    public static final String TAG_XML_QUERY = "query";
    /**
     * rami di create per il db
     */
    public static final String TAG_XML_CREATE = "create";
    /**
     * secret key per le staistiche
     */
    public static final String TAG_XML_KEY = "key";

    /**
     * @return the clazz
     */
    public String getClazz() {
        return clazz;
    }

    /**
     * @param clazz the clazz to set
     */
    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    /**
     * @return the conn
     */
    public String getConn() {
        return conn;
    }

    /**
     * @param conn the conn to set
     */
    public void setConn(String conn) {
        this.conn = conn;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @return the create
     */
    public ArrayList<String> getCreate() {
        return create;
    }

    /**
     * @param create the create to set
     */
    public void setCreate(ArrayList<String> create) {
        this.create = create;
    }

    /**
     *
     * @param query
     */
    public void addCreate(String query) {
        if (this.create == null) {
            this.create = new ArrayList<String>();
        }
        this.create.add(query);
    }

    /**
     *
     * @return
     */
    @Override
    public String toString() {
        return "clazz:" + clazz + " - "
                + "conn:" + conn + " - "
                + "key:" + key + " - "
                + "create:" + create ;


    }
}
